<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html class="no-js">
<head>
<title>选课系统</title>
<!-- Bootstrap -->
<link
	href="${pageContext.request.contextPath }/bootstrap/css/bootstrap.min.css"
	rel="stylesheet" media="screen">
<link
	href="${pageContext.request.contextPath }/bootstrap/css/bootstrap-responsive.min.css"
	rel="stylesheet" media="screen">
<link
	href="${pageContext.request.contextPath }/vendors/easypiechart/jquery.easy-pie-chart.css"
	rel="stylesheet" media="screen">
<link href="${pageContext.request.contextPath }/assets/styles.css"
	rel="stylesheet" media="screen">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
            <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
<script
	src="${pageContext.request.contextPath }/vendors/modernizr-2.6.2-respond-1.1.0.min.js"></script>
</head>

<body>
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container-fluid">
				<a class="btn btn-navbar" data-toggle="collapse"
					data-target=".nav-collapse"> <span class="icon-bar"></span> <span
					class="icon-bar"></span> <span class="icon-bar"></span>
				</a> <a class="brand" href="#">选课系统</a>
				<div class="nav-collapse collapse">
					<ul class="nav pull-right">
						<li class="dropdown"><a href="#" role="button"
							class="dropdown-toggle" data-toggle="dropdown"> <i
								class="icon-user"></i>${student.academy.name } ${student.name }
								<i class="caret"></i>
						</a>
							<ul class="dropdown-menu">
								<li><a tabindex="-1" href="user_logout.action?id=1">退出</a></li>
							</ul></li>
					</ul>
					<ul class="nav">
						<li class="active"><a href="#">任选[公选]</a></li>
						<li class="dropdown"><a href="#" data-toggle="dropdown"
							class="dropdown-toggle">课程类别 <b class="caret"></b>
						</a>
							<ul class="dropdown-menu" id="menu1">
								<li><a href="student_getCourses.action?type=公选">任选[公选]</a>
								</li>
								<li><a href="student_getCourses.action?type=体育任选">体育任选</a>
								</li>
								<li class="divider"></li>
								<li><a href="student_getCourses.action?type=必修">必修</a></li>
								<li><a href="student_getCourses.action?type=专选">专选</a></li>
								<li><a href="student_getCourses.action?type=必修分组">必修分组</a></li>
								<li><a href="student_getCourses.action?type=专选分组">专选分组</a></li>
								<li class="divider"></li>
								<li><a href="student_getCourses.action?type=已选课程">已选课程</a></li>
							</ul></li>
					</ul>
				</div>
				<!--/.nav-collapse -->
			</div>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span2" id="sidebar">
				<ul class="nav nav-list bs-docs-sidenav nav-collapse collapse">
					<li class="active"><a><i
							class="badge badge-success pull-right"></i>课程类别</a></li>
					<li><a href="student_getCourses.action?type=公选"><i
							class="icon-chevron-right"></i>任选[公选]</a></li>
					<li><a href="student_getCourses.action?type=体育任选"><i
							class="icon-chevron-right"></i>体育任选</a></li>
					<li><a href="student_getCourses.action?type=必修"><i
							class="icon-chevron-right"></i>必修</a></li>
					<li><a href="student_getCourses.action?type=专选"><i
							class="icon-chevron-right"></i>专选</a></li>
					<li><a href="student_getCourses.action?type=必修分组"><i
							class="icon-chevron-right"></i>必修分组</a></li>
					<li><a href="student_getCourses.action?type=专选分组"><i
							class="icon-chevron-right"></i>专选分组</a></li>
					<li><a href="student_getCourses.action?type=已选课程"><i
							class="icon-chevron-right"></i>已选课程</a></li>
				</ul>
			</div>

			<!--/span-->
			<div class="span10" id="content">
				<c:if test="${!empty message }">
					<div class="row-fluid">
						<div class="alert alert-success">
							<button type="button" class="close" data-dismiss="alert">&times;</button>
							<h4>提示</h4>
							${message }
						</div>
					</div>
				</c:if>
				<div class="row-fluid">
					<div class="span6">
						<!-- block -->
						<div class="block">
							<div class="navbar navbar-inner block-header">
								<div class="muted pull-left">公选课程</div>
								<div class="pull-right">
									<span class="badge badge-info">${fn:length(requestScope.courses) }</span>

								</div>
							</div>
							<div class="block-content collapse in">
								<table class="table table-striped">
									<thead>
										<tr>
											<th>开课单位</th>
											<th>选课类别</th>
											<th>教学班名称</th>
											<th>任课老师</th>
											<th>上课学期</th>
											<th>学分</th>
											<th>剩余容量</th>
											<th>选课人数</th>
											<th>总容量</th>
											<th>选课要求</th>
											<th>选课</th>
										</tr>
									</thead>
									<tbody>
										<c:forEach var="course" items="${requestScope.courses }">
											<tr>
												<td>${course.teacher.academy.name }</td>
												<td>${course.type }</td>
												<td>${course.name }</td>
												<td>${course.teacher.name}</td>
												<td>20192</td>
												<td>${course.score }</td>
												<td>${course.sum - course.selected }</td>
												<td>${course.selected }</td>
												<td>${course.sum }</td>
												<td>无</td>
												<td><a class="btn btn-primary"
													href="student_selectCourse.action?cid=${course.id }">选课</a></td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<hr>
	</div>
	<!--/.fluid-container-->
	<script
		src="${pageContext.request.contextPath }/vendors/jquery-1.9.1.min.js"></script>
	<script
		src="${pageContext.request.contextPath }/bootstrap/js/bootstrap.min.js"></script>
	<script
		src="${pageContext.request.contextPath }/vendors/easypiechart/jquery.easy-pie-chart.js"></script>
	<script src="${pageContext.request.contextPath }/assets/scripts.js"></script>
	<script>
		$(function() {
			// Easy pie charts
			$('.chart').easyPieChart({
				animate : 1000
			});
		});
	</script>
</body>

</html>